package plp.functional2.primitive;

import plp.expressions2.expression.Expressao;
import plp.expressions2.expression.Id;
import plp.expressions2.memory.AmbienteCompilacao;
import plp.expressions2.memory.AmbienteExecucao;
import plp.expressions2.memory.VariavelJaDeclaradaException;
import plp.expressions2.memory.VariavelNaoDeclaradaException;

public class Output implements Primitiva {
	
	Expressao exp;	
	private Id idProcess;

	public void setIdProcess(Id idProcess) {
		this.idProcess = idProcess;
	}
	
	public Output(Expressao exp){
		this.exp = exp;
	}

	public void executar(AmbienteExecucao amb)
			throws VariavelNaoDeclaradaException, VariavelJaDeclaradaException {
		amb.write(exp.avaliar(amb));		
	}

	public boolean checaTipo(AmbienteCompilacao amb)
			throws VariavelNaoDeclaradaException, VariavelJaDeclaradaException {
		// TODO Auto-generated method stub
		return false;
	}

}
